/*   
 * Copyright (c) 2010-2020 Founder Ltd. All Rights Reserved.   
 *   
 * This software is the confidential and proprietary information of   
 * Founder. You shall not disclose such Confidential Information   
 * and shall use it only in accordance with the terms of the agreements   
 * you entered into with Founder.   
 *   
 */
package com.wujw.auto.utils;

/**
 * 数据类型
 * 
 * @author wujw
 * @version 1.0, 2017年11月11日
 */
public class JDBCTypeUtil {

    public static String getJDBCType(String dataType) {
        String type = "";
        if ("String".equals(dataType)) {
            type = "VARCHAR";
        }
        if ("BigDecimal".equals(dataType)) {
            type = "NUMERIC";
        }
        if ("boolean".equals(dataType)) {
            type = "BOOLEAN";
        }
        if ("byte".equals(dataType)) {
            type = "TINYINT";
        }
        if ("short".equals(dataType)) {
            type = "SMALLINT";
        }
        if ("int".equals(dataType)) {
            type = "INTEGER";
        }
        if ("Integer".equals(dataType)) {
            type = "INTEGER";
        }
        if ("long".equals(dataType)) {
            type = "BIGINT";
        }
        if ("float".equals(dataType)) {
            type = "DOUBLE";
        }
        if ("double".equals(dataType)) {
            type = "DOUBLE";
        }
        if ("Date".equals(dataType)) {
            type = "DATE";
        }
        if ("Time".equals(dataType)) {
            type = "TIME";
        }
        if ("Timestamp".equals(dataType)) {
            type = "TIMESTAMP";
        }
        return type;
    }
}
